commit: Fix crash if dfd_iter is NULL
authorAlexander Larsson <alexl@redhat.com>
Wed, 13 Apr 2016 19:18:19 +0000 (21:18 +0200)
committerColin Walters (automation) <walters+githubbot@verbum.org>
Wed, 13 Apr 2016 19:37:06 +0000 (19:37 +0000)
commit77ea287cd240825af311f8ac06f272b9a3981b54
treef0ce3f833235da375656e5686f233816fe221140
parent6a57d0a2f03eddbe44f1d0edaeb5ef32a99d3e69
commit: Fix crash if dfd_iter is NULL

in write_directory_content_to_mtree_internal dfd_iter can be NULL,
for instance if commiting from --tree=ref=FOO. Don't blindly de-ref
it to avoid crashing.

Closes: #256
Approved by: cgwalters
src/libostree/ostree-repo-commit.c